<div [@routerTransition]>
    <div class="m-subheader">
        <div class="d-flex align-items-center">
            <div class="mr-auto col-xs-6">
                <h3 class="m-subheader__title m-subheader__title--separator">
                    <span>计费方案记录</span>
                </h3>
                <span class="m-section__sub">
                    <span>
                        <button
                            pButton
                            type="button"
                            label="[ 车场编号:{{ parkingCoce }} ,车场名称:{{
                                parkingName
                            }}]"
                            class="ui-button-success"
                        ></button>
                    </span>
                </span>
            </div>
            <div class="col text-right mt-3 mt-md-0">
                <button
                    (click)="
                        createOrEditParkingGuradModal.show(
                            parkingCoce,
                            parkingName,
                            parkingid,
                            neighbourhood_Name,
                            neighbourhood_id
                        )
                    "
                    class="btn btn-primary"
                >
                    <i class="fa fa-plus"></i> 添加计费方案
                </button>
            </div>
        </div>
    </div>

    <div class="m-content">
        <div class="m-portlet m-portlet--mobile">
            <div class="m-portlet__body">
                <div class="tab-content">
                    <div class="row align-items-center">
                        <!--<Primeng-TurboTable-Start>-->
                        <div
                            class="primeng-datatable-container"
                            [busyIf]="primengTableHelper.isLoading"
                        >
                            <p-table
                                #dataTable
                                (onLazyLoad)="getBillingScheme($event)"
                                [value]="primengTableHelper.records"
                                rows="{{
                                    primengTableHelper.defaultRecordsCountPerPage
                                }}"
                                [paginator]="false"
                                [lazy]="true"
                                [scrollable]="true"
                                ScrollWidth="100%"
                                [responsive]="primengTableHelper.isResponsive"
                                [resizableColumns]="
                                    primengTableHelper.resizableColumns
                                "
                            >
                                <ng-template pTemplate="header">
                                    <tr>
                                        <!-- <th style="width: 130px">
                                        {{ "Actions" | localize }}
                                    </th> -->
                                        <th
                                            style="
                                                width: 8%;
                                                text-align: center;
                                            "
                                        >
                                            岗亭名称
                                        </th>
                                        <th
                                            style="
                                                width: 8%;
                                                text-align: center;
                                            "
                                        >
                                            岗亭编号
                                        </th>

                                        <th
                                            style="
                                                width: 35%;
                                                text-align: center;
                                            "
                                        >
                                            操作
                                        </th>
                                        <th
                                            style="
                                                width: 20%;
                                                text-align: center;
                                            "
                                        >
                                            编辑
                                        </th>
                                    </tr>
                                </ng-template>
                                <ng-template
                                    pTemplate="body"
                                    let-record="$implicit"
                                >
                                    <tr>
                                        <td
                                            style="
                                                width: 8%;
                                                text-align: center;
                                            "
                                        >
                                            {{ record.guradName }}
                                        </td>
                                        <td
                                            style="
                                                width: 8%;
                                                text-align: center;
                                            "
                                        >
                                            {{ record.guardNo }}
                                        </td>

                                        <td
                                            style="
                                                width: 35%;
                                                text-align: center;
                                            "
                                        >
                                            <button
                                                pButton
                                                type="button"
                                                label="设备管理"
                                                class="ui-button-rounded"
                                                (click)="palceSet(record)"
                                            ></button>
                                        </td>
                                        <td
                                            style="
                                                width: 20%;
                                                text-align: center;
                                            "
                                        >
                                            <button
                                                pButton
                                                type="button"
                                                label="编辑"
                                                class="
                                                    ui-button-rounded
                                                    ui-button-success
                                                "
                                                icon="fa fa-edit"
                                                style="margin-right: 0.5em"
                                                (click)="
                                                    createOrEditParkingGuradModal.show(
                                                        parkingCoce,
                                                        parkingName,
                                                        parkingid,
                                                        neighbourhood_Name,
                                                        neighbourhood_id,
                                                        record.id
                                                    )
                                                "
                                            ></button>
                                            <button
                                                pButton
                                                type="button"
                                                label="删除"
                                                class="
                                                    ui-button-rounded
                                                    ui-button-danger
                                                "
                                                icon="fa fa-trash"
                                                (click)="
                                                    deleteParkingGuard(record)
                                                "
                                            ></button>
                                        </td></tr
                                ></ng-template>
                            </p-table>
                            <div
                                class="primeng-no-data"
                                *ngIf="
                                    primengTableHelper.totalRecordsCount == 0
                                "
                            >
                                {{ l("NoData") }}
                            </div>
                            <div class="primeng-paging-container">
                                <p-paginator
                                    rows="{{
                                        primengTableHelper.defaultRecordsCountPerPage
                                    }}"
                                    #paginator
                                    (onPageChange)="getBillingScheme($event)"
                                    [totalRecords]="
                                        primengTableHelper.totalRecordsCount
                                    "
                                    [rowsPerPageOptions]="
                                        primengTableHelper.predefinedRecordsCountPerPage
                                    "
                                >
                                </p-paginator>
                                <span class="total-records-count">
                                    共计：{{
                                        primengTableHelper.totalRecordsCount
                                    }}
                                </span>
                            </div>
                        </div>
                        <!--<Primeng-TurboTable-End>-->
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- <createOrEditParkingGuradModal
      #createOrEditParkingGuradModal
      (modalSave)="getParkingGuard()"
  ></createOrEditParkingGuradModal> -->
</div>
